<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>高考倒计时</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            color: #333;
        }
        .container {
            text-align: center;
            background: #fff;
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }
        h1 {
            font-size: 48px;
            margin-bottom: 20px;
        }
        #countdown {
            font-size: 36px;
            font-weight: bold;
            color: #d32f2f;
        }
        @media (max-width: 768px) {
            h1 { font-size: 32px; }
            #countdown { font-size: 24px; }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>2026年高考倒计时</h1>
        <div id="countdown">剩余时间加载中...</div>
    </div>
    <script>
        // 设置高考目标日期（2026年6月7日 9:00 AM）
        const targetDate = new Date('2026-06-07T09:00:00').getTime();

        function updateCountdown() {
            const now = new Date().getTime();
            const distance = targetDate - now;

            if (distance < 0) {
                document.getElementById('countdown').innerText = '高考已结束！';
                return;
            }

            const days = Math.floor(distance / (1000 * 60 * 60 * 24));
            const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
            const seconds = Math.floor((distance % (1000 * 60)) / 1000);

            document.getElementById('countdown').innerText = 
                `距离高考还有 ${days}天 ${hours}小时 ${minutes}分钟 ${seconds}秒`;
        }

        // 每秒更新一次
        setInterval(updateCountdown, 1000);
        // 立即运行一次
        updateCountdown();
    </script>
</body>
</html>